package cn.kgc.userprovider.service;

import cn.kgc.mapper.UserMapper;
import cn.kgc.pojo.User;
import com.netflix.discovery.converters.Auto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName RestUserServiceImpl
 * @Description TODO ,
 * @Author yaozhaobao
 * @Date 2020/12/13 9:44
 * @Version 1.0
 **/
@Service
public class UserServiceImpl implements UserService{

    //调用dao层数据接口实现查询
    @Resource
    UserMapper userMapper;



    @Override
    public Integer checkUserByNamepwd(String userCode, String password) throws Exception {
        return userMapper.getUserByN_P(userCode,password);
    }

    @Override
    public Integer addUser(User user) {
        return userMapper.insertUser(user);
    }
}
